GAS LISTING /tmp/ccI29pwL.s 			page 1


   1              		.file	"bubble.c"
   2              		.text
   3              	.globl getListNode
   4              		.type	getListNode, @function
   5              	getListNode:
   6 0000 55       		pushl	%ebp
   7 0001 89E5     		movl	%esp, %ebp
   8 0003 83EC14   		subl	$20, %esp
   9 0006 6A0C     		pushl	$12
  10 0008 E8FCFFFF 		call	malloc
  10      FF
  11 000d 89C2     		movl	%eax, %edx
  12 000f 83C410   		addl	$16, %esp
  13 0012 833D0000 		cmpl	$0, front
  13      000000
  14 0019 751A     		jne	.L2
  15 001b A3000000 		movl	%eax, tail
  15      00
  16 0020 A3000000 		movl	%eax, front
  16      00
  17 0025 C7400800 		movl	$0, 8(%eax)
  17      000000
  18 002c C7400400 		movl	$0, 4(%eax)
  18      000000
  19 0033 EB16     		jmp	.L3
  20              	.L2:
  21 0035 A1000000 		movl	tail, %eax
  21      00
  22 003a 895004   		movl	%edx, 4(%eax)
  23 003d A1000000 		movl	tail, %eax
  23      00
  24 0042 894208   		movl	%eax, 8(%edx)
  25 0045 89150000 		movl	%edx, tail
  25      0000
  26              	.L3:
  27 004b 89D0     		movl	%edx, %eax
  28 004d C9       		leave
  29 004e C3       		ret
  30              		.size	getListNode, .-getListNode
  31              	.globl getNode
  32              		.type	getNode, @function
  33              	getNode:
  34 004f 55       		pushl	%ebp
  35 0050 89E5     		movl	%esp, %ebp
  36 0052 83EC08   		subl	$8, %esp
  37 0055 E8FCFFFF 		call	getListNode
  37      FF
  38 005a C9       		leave
  39 005b C3       		ret
  40              		.size	getNode, .-getNode
  41              		.section	.rodata.str1.1,"aMS",@progbits,1
  42              	.LC0:
  43 0000 25640A00 		.string	"%d\n"
  44              		.text
  45              	.globl printNodes
  46              		.type	printNodes, @function
  47              	printNodes:
GAS LISTING /tmp/ccI29pwL.s 			page 2


  48 005c 55       		pushl	%ebp
  49 005d 89E5     		movl	%esp, %ebp
  50 005f 53       		pushl	%ebx
  51 0060 83EC04   		subl	$4, %esp
  52 0063 8B1D0000 		movl	front, %ebx
  52      0000
  53 0069 85DB     		testl	%ebx, %ebx
  54 006b 7419     		je	.L10
  55              	.L8:
  56 006d 83EC08   		subl	$8, %esp
  57 0070 FF33     		pushl	(%ebx)
  58 0072 68000000 		pushl	$.LC0
  58      00
  59 0077 E8FCFFFF 		call	printf
  59      FF
  60 007c 8B5B04   		movl	4(%ebx), %ebx
  61 007f 83C410   		addl	$16, %esp
  62 0082 85DB     		testl	%ebx, %ebx
  63 0084 75E7     		jne	.L8
  64              	.L10:
  65 0086 8B5DFC   		movl	-4(%ebp), %ebx
  66 0089 C9       		leave
  67 008a C3       		ret
  68              		.size	printNodes, .-printNodes
  69              	.globl bubbleSortRev
  70              		.type	bubbleSortRev, @function
  71              	bubbleSortRev:
  72 008b 55       		pushl	%ebp
  73 008c 89E5     		movl	%esp, %ebp
  74 008e 53       		pushl	%ebx
  75 008f 8B0D0000 		movl	front, %ecx
  75      0000
  76 0095 89CB     		movl	%ecx, %ebx
  77 0097 85C9     		testl	%ecx, %ecx
  78 0099 7434     		je	.L22
  79              	.L20:
  80 009b 83790400 		cmpl	$0, 4(%ecx)
  81 009f 7421     		je	.L24
  82              	.L19:
  83 00a1 8B5104   		movl	4(%ecx), %edx
  84 00a4 8B01     		movl	(%ecx), %eax
  85 00a6 3B02     		cmpl	(%edx), %eax
  86 00a8 7D0F     		jge	.L17
  87 00aa 3302     		xorl	(%edx), %eax
  88 00ac 8901     		movl	%eax, (%ecx)
  89 00ae 3102     		xorl	%eax, (%edx)
  90 00b0 8B5104   		movl	4(%ecx), %edx
  91 00b3 8B01     		movl	(%ecx), %eax
  92 00b5 3302     		xorl	(%edx), %eax
  93 00b7 8901     		movl	%eax, (%ecx)
  94              	.L17:
  95 00b9 8B4904   		movl	4(%ecx), %ecx
  96 00bc 83790400 		cmpl	$0, 4(%ecx)
  97 00c0 75DF     		jne	.L19
  98              	.L24:
  99 00c2 8B0D0000 		movl	front, %ecx
  99      0000
GAS LISTING /tmp/ccI29pwL.s 			page 3


 100 00c8 8B5B04   		movl	4(%ebx), %ebx
 101 00cb 85DB     		testl	%ebx, %ebx
 102 00cd 75CC     		jne	.L20
 103              	.L22:
 104 00cf 5B       		popl	%ebx
 105 00d0 C9       		leave
 106 00d1 C3       		ret
 107              		.size	bubbleSortRev, .-bubbleSortRev
 108              	.globl bubbleSort
 109              		.type	bubbleSort, @function
 110              	bubbleSort:
 111 00d2 55       		pushl	%ebp
 112 00d3 89E5     		movl	%esp, %ebp
 113 00d5 53       		pushl	%ebx
 114 00d6 8B0D0000 		movl	front, %ecx
 114      0000
 115 00dc 89CB     		movl	%ecx, %ebx
 116 00de 85C9     		testl	%ecx, %ecx
 117 00e0 7434     		je	.L36
 118              	.L34:
 119 00e2 83790400 		cmpl	$0, 4(%ecx)
 120 00e6 7421     		je	.L38
 121              	.L33:
 122 00e8 8B5104   		movl	4(%ecx), %edx
 123 00eb 8B01     		movl	(%ecx), %eax
 124 00ed 3B02     		cmpl	(%edx), %eax
 125 00ef 7E0F     		jle	.L31
 126 00f1 3302     		xorl	(%edx), %eax
 127 00f3 8901     		movl	%eax, (%ecx)
 128 00f5 3102     		xorl	%eax, (%edx)
 129 00f7 8B5104   		movl	4(%ecx), %edx
 130 00fa 8B01     		movl	(%ecx), %eax
 131 00fc 3302     		xorl	(%edx), %eax
 132 00fe 8901     		movl	%eax, (%ecx)
 133              	.L31:
 134 0100 8B4904   		movl	4(%ecx), %ecx
 135 0103 83790400 		cmpl	$0, 4(%ecx)
 136 0107 75DF     		jne	.L33
 137              	.L38:
 138 0109 8B0D0000 		movl	front, %ecx
 138      0000
 139 010f 8B5B04   		movl	4(%ebx), %ebx
 140 0112 85DB     		testl	%ebx, %ebx
 141 0114 75CC     		jne	.L34
 142              	.L36:
 143 0116 5B       		popl	%ebx
 144 0117 C9       		leave
 145 0118 C3       		ret
 146              		.size	bubbleSort, .-bubbleSort
 147              	.globl main
 148              		.type	main, @function
 149              	main:
 150 0119 55       		pushl	%ebp
 151 011a 89E5     		movl	%esp, %ebp
 152 011c 53       		pushl	%ebx
 153 011d 83EC14   		subl	$20, %esp
 154 0120 83E4F0   		andl	$-16, %esp
GAS LISTING /tmp/ccI29pwL.s 			page 4


 155 0123 83EC10   		subl	$16, %esp
 156 0126 BB010000 		movl	$1, %ebx
 156      00
 157 012b C7050000 		movl	$0, tail
 157      00000000 
 157      0000
 158 0135 C7050000 		movl	$0, front
 158      00000000 
 158      0000
 159 013f E8FCFFFF 		call	readfile
 159      FF
 160 0144 83EC08   		subl	$8, %esp
 161 0147 6A00     		pushl	$0
 162 0149 8D45F0   		leal	-16(%ebp), %eax
 163 014c 50       		pushl	%eax
 164 014d E8FCFFFF 		call	gettimeofday
 164      FF
 165 0152 83C410   		addl	$16, %esp
 166              	.L40:
 167 0155 E8FCFFFF 		call	bubbleSort
 167      FF
 168 015a E8FCFFFF 		call	bubbleSortRev
 168      FF
 169 015f 4B       		decl	%ebx
 170 0160 75F3     		jne	.L40
 171 0162 83EC08   		subl	$8, %esp
 172 0165 6A00     		pushl	$0
 173 0167 8D45E8   		leal	-24(%ebp), %eax
 174 016a 50       		pushl	%eax
 175 016b E8FCFFFF 		call	gettimeofday
 175      FF
 176 0170 83C408   		addl	$8, %esp
 177 0173 8D45E8   		leal	-24(%ebp), %eax
 178 0176 50       		pushl	%eax
 179 0177 8D45F0   		leal	-16(%ebp), %eax
 180 017a 50       		pushl	%eax
 181 017b E8FCFFFF 		call	printTime
 181      FF
 182 0180 B8000000 		movl	$0, %eax
 182      00
 183 0185 8B5DFC   		movl	-4(%ebp), %ebx
 184 0188 C9       		leave
 185 0189 C3       		ret
 186              		.size	main, .-main
 187              		.comm	front,4,4
 188              		.comm	tail,4,4
 189              		.section	.note.GNU-stack,"",@progbits
 190              		.ident	"GCC: (GNU) 3.4.6 20060404 (Red Hat 3.4.6-8)"
